// 环境配置
const dev = '2';   //1：生产    2：测试-内网    3：测试-服务器  4：验证   

// 请求方式
const METHOD = {
  GET: 'GET',
  POST: 'POST',
}

// let host = SERVERS_INFO[SERVERS_ALIAS.SMK_BASE].host;

// 服务名
export const SERVERS_ALIAS = {
  MAIN: Symbol('MAIN'),   //原始数据类型Symbol，表示独一无二的值
  WX_BASE: Symbol('WX_BASE'),
  SMK_BASE: Symbol('SMK_BASE'),
  AGG_PAY: Symbol('SMK_PAY'),
}

// 域名接口管理          *********************************上线配置**************************************
export const SERVERS_INFO = {
  [SERVERS_ALIAS.MAIN]: {
    host: function () {
      switch (dev) { 
        case '1':   //生产
          return 'https://activity.96225.com/smk_city_activity';
          break;
        case '2':   //测试-内网
          return 'http://192.168.23.200:8086/smk_city_activity';
          break;
        case '3':   //测试-服务器
          return 'http://115.236.162.166:18081/smk_city_activity';
          break;
        case '4':   // 验证
          return 'https://activity.96225.com/test_smk_city_activity';
          break;
        default:
          return 'https://activity.96225.com/smk_city_activity';
      }
    }(),
    desc: '主要接口'
  },
  [SERVERS_ALIAS.WX_BASE]: {
    host: function () {
      switch (dev) { 
        case '1':   //生产
          return 'https://weixin.96225.com/smk_weixin/miniapp';
          break;
        case '2':   //测试-内网
          return 'http://115.236.162.166:18081/smk_weixin_test/miniapp';
          break;
        case '3':   //测试-服务器
          return 'http://115.236.162.166:18081/smk_weixin_test/miniapp';
          break;
        case '4':   // 验证
          return 'https://weixin.96225.com/smk_weixin/miniapp';
          break;
        default:
          return 'https://weixin.96225.com/smk_weixin/miniapp';
      }
    }(),
    desc: '小程序',
  },
  [SERVERS_ALIAS.SMK_BASE]: {
    host: function () {
      switch (dev) { 
        case '1':   //生产
          return 'https://smkmp.96225.com/smkcenter/login/1.0.0';
          break;
        case '2':   //测试-内网
          return 'http://192.168.23.211:8084/smkcenter/login/1.0.0';
          break;
        case '3':   //测试-服务器
          return 'http://115.236.162.166:18081/smkcenter/login/1.0.0';
          break;
        case '4':   // 验证
          return 'https://smkmptest.96225.com/smkcenter/login/1.0.0';
          break;
        default:
          return 'https://smkmp.96225.com/smkcenter/login/1.0.0';
      }
    }(),
    desc: '平台组统一登录相关接口',
  },
  [SERVERS_ALIAS.SMK_PAY]: {
    host: function () {
      switch (dev) {
        case '1':   //生产
          return 'https://mobilepay.96225.com/smkpay/pay/1.0.0';
          break;
        case '2':   //测试-内网
          return 'http://192.168.23.211:8081/smkpay/pay/1.0.0';
          break;
        case '3':   //测试-服务器
          return 'http://115.236.162.166:18081/smkpay/pay/1.0.0';
          break;
        case '4':   // 验证
          return 'https://mobilepaytest.96225.com/smkpay/pay/1.0.0';
          break;
        default:
          return 'https://mobilepay.96225.com/smkpay/pay/1.0.0';
      }
    }(),
    desc: '第三方聚合支付',
  },
}

// 其他信息                   *********************************上线配置**************************************
export const OTHER_INFO = {           
  clientCode: dev == '1' ? '300005' : '100001',           //商户号
  appId:'wxbb59b4862d99c420',     //appID
} 


// 接口名
export const PATHS_ALIAS = {
  // 首页接口
  GET_HOME_PARTLIST: Symbol('GET_HOME_PARTLIST'),
  
  // 登录******************************************************
  // 登录-code换取用户信息
  GET_OPEN_INFO: Symbol('GET_OPEN_INFO'),
  // 获取unionId
  GET_UNION_ID: Symbol('GET_UNION_ID'),
  // 第三方登陆判断
  THIRD_USER_LOGIN: Symbol('THIRD_USER_LOGIN'),
  // 判断输入手机是否存在及绑定第三方账户
  CHECK_THIRD_USER_EXIST: Symbol('CHECK_THIRD_USER_EXIST'),
  // 发送注册验证码
  SEND_REGISTER_MSG: Symbol('SEND_REGISTER_MSG'),
  // 发送登录验证码
  SEND_LOGIN_MSG: Symbol('SEND_LOGIN_MSG'),
  // 登录--未注册手机号
  CHECK_REGIEST_WITHOUT_PASS: Symbol('CHECK_REGIEST_WITHOUT_PASS'),
  // 登录--已注册手机号
  LOGIN_MSG_CHECK: Symbol('LOGIN_MSG_CHECK'),


  // 首页列表
  GET_GROUP_LIST: Symbol('GET_GROUP_LIST'),
  //活动详情
  GET_GROUP_ACT_DETAIL: Symbol('GET_GROUP_ACT_DETAIL'),
  // 可拼团列表
  GET_GROUP_ORDER_LIST: Symbol('GET_GROUP_ORDER_LIST'),
  // 获取票种详情
  GET_TICKET_INFO: Symbol('GET_TICKET_INFO'),
  // 获取票种日期
  GET_TICKET_DATE: Symbol('GET_TICKET_DATE'),
  // 获取票种时间
  GET_TICKET_TIME: Symbol('GET_TICKET_TIME：'),

  // 常用联系人************************************************
  //用户信息-默认联系人
  GET_USER_INFO:Symbol('GET_USER_INFO'),
  // 联系人列表
  GET_CONTACTS_LIST: Symbol('GET_CONTACTS_LIST'),
  // 添加联系人
  ADD_CONTACTS: Symbol('ADD_CONTACTS'),
  // 修改联系人
  UPDATE_CONTACTS: Symbol('UPDATE_CONTACTS'),
  // 删除联系人
  DELETE_CONTACTS: Symbol('DELETE_CONTACTS'),
  // 联系人详情
  VIEW_CONTACTS: Symbol('VIEW_CONTACTS'),
  // 拼团报名
  CREATE_ORDER: Symbol('CREATE_ORDER'),
  // 第三方聚合支付
  AGG_PAY: Symbol('AGG_PAY'),
  // 二次支付--提交订单
  SECOND_PAY_ORDER: Symbol('SECOND_PAY_ORDER'),
  // 支付成功-确认订单
  CONFIRM_GROUP_ORDER: Symbol('CONFIRM_GROUP_ORDER'),


  // 我的订单
  // 订单列表
  GET_ORDER_LIST: Symbol('GET_ORDER_LIST'),
  // 订单详情
  GET_ORDER_DETAIL: Symbol('GET_ORDER_DETAIL'),
  // 拼团详情
  GET_GROUP_DETAIL: Symbol('GET_GROUP_DETAIL'),
  
  
} 


// 接口统一管理
export const PATHS_INFO = {
  // [PATHS_ALIAS.GET_HOME_PARTLIST]: {
  //   server: SERVERS_ALIAS.MAIN,   //域名
  //   method: METHOD.GET,           //请求方式
  //   path: '/home/getHPPartList.ext',  //请求地址
  // },
  [PATHS_ALIAS.GET_OPEN_INFO]: {
    server: SERVERS_ALIAS.WX_BASE,
    method: METHOD.POST,
    path: '/openIdByType.ext',
  },
  [PATHS_ALIAS.GET_UNION_ID]: {
    server: SERVERS_ALIAS.WX_BASE,
    method: METHOD.POST,
    path: '/userInfoByType.ext',
  },
  [PATHS_ALIAS.THIRD_USER_LOGIN]: {
    server: SERVERS_ALIAS.SMK_BASE,
    method: METHOD.POST,
    path: '/ThirdUserLogin',
  },
  [PATHS_ALIAS.CHECK_THIRD_USER_EXIST]: {
    server: SERVERS_ALIAS.SMK_BASE,
    method: METHOD.POST,
    path: '/checkThirdUserExist',
  },
  [PATHS_ALIAS.SEND_REGISTER_MSG]: {
    server: SERVERS_ALIAS.SMK_BASE,
    method: METHOD.POST,
    path: '/sendMsg',
  },
  [PATHS_ALIAS.SEND_LOGIN_MSG]: {
    server: SERVERS_ALIAS.SMK_BASE,
    method: METHOD.POST,
    path: '/loginMsgSend',
  },
  [PATHS_ALIAS.CHECK_REGIEST_WITHOUT_PASS]: {
    server: SERVERS_ALIAS.SMK_BASE,
    method: METHOD.POST,
    path: '/checkRegiestWithoutPassword',
  },
  [PATHS_ALIAS.LOGIN_MSG_CHECK]: {
    server: SERVERS_ALIAS.SMK_BASE,
    method: METHOD.POST,
    path: '/loginMsgCheck',
  },
  [PATHS_ALIAS.GET_CONTACTS_LIST]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/contacts/getContactsList.ext',
  },
  [PATHS_ALIAS.GET_GROUP_LIST]: {
    server: SERVERS_ALIAS.MAIN,  
    method: METHOD.POST,
    path: '/applet/getGroupActList.ext',
  },
  [PATHS_ALIAS.GET_GROUP_ACT_DETAIL]: {
    server: SERVERS_ALIAS.MAIN, 
    method: METHOD.POST,
    path: '/applet/getGroupActDetail.ext',
  },
  [PATHS_ALIAS.GET_TICKET_DATE]: {
    server: SERVERS_ALIAS.MAIN,  
    method: METHOD.POST,
    path: '/ticket/getTicketDateByTicketId.ext',
  },
  [PATHS_ALIAS.GET_TICKET_TIME]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/ticket/getTicketTimeByTicketDate.ext',
  },
  [PATHS_ALIAS.GET_TICKET_INFO]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/ticket/getTicketInfo.ext',
  },
  [PATHS_ALIAS.GET_USER_INFO]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/baseUser/getUserBaseInfoByUserId.ext',
  },
  [PATHS_ALIAS.ADD_CONTACTS]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/contacts/addContacts.ext',
  },
  [PATHS_ALIAS.UPDATE_CONTACTS]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/contacts/updateContacts.ext',
  },
  [PATHS_ALIAS.VIEW_CONTACTS]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/contacts/viewContacts.ext',
  },
  [PATHS_ALIAS.DELETE_CONTACTS]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/contacts/deleteContacts.ext',
  },
  [PATHS_ALIAS.CREATE_ORDER]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/applet/createGroupOrder.ext',
  },
  [PATHS_ALIAS.AGG_PAY]: {
    server: SERVERS_ALIAS.SMK_PAY,
    method: METHOD.POST,
    path: '/aggpay',
  },
  [PATHS_ALIAS.GET_ORDER_LIST]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/user/getUserOrderList.ext',
  },
  [PATHS_ALIAS.GET_ORDER_DETAIL]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/user/getOrderDetail.ext',
  },
  [PATHS_ALIAS.SECOND_PAY_ORDER]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/order/secondPayOrder.ext',
  },
  [PATHS_ALIAS.GET_GROUP_DETAIL]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/user/getUserGroupOrderDetail.ext',
  },
  [PATHS_ALIAS.GET_GROUP_ORDER_LIST]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/applet/getGroupList.ext',
  },
  [PATHS_ALIAS.CONFIRM_GROUP_ORDER]: {
    server: SERVERS_ALIAS.MAIN,
    method: METHOD.POST,
    path: '/applet/confirmGroupOrder.ext',
  },


  
  
  


  


  


  
  

  
  
  

  
}